<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">Dashboard</h1>

        <p class="col-lg-12 lead" ng-if="success_message">{{ success_message }}</p>

        <p class="col-lg-12 lead" ng-if="error_message">{{ error_message }}</p>
        <table class="table table-striped" ng-if="sensors">
            <tbody>

            <tr ng-repeat="(key, properties) in sensors" ng-if="properties">
                <td>
                    <a href="#/sensors/{{ key }}">{{ key }}</a>
                </td>
                <td>
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                            <tr>
                                <th ng-repeat="field in properties.fields">{{ field.name }}</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td ng-repeat="value in properties.values track by $index">{{ value }}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </td>
                <td>
                    <button class="btn btn-danger btn-sm" ng-click="remove(key)">Remove from favorites</button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>